package com.wang.store.mapper;

import com.wang.store.entity.Address;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface AddressMapper  {
    /**
     *
     * @param address 收货地址的数据
     * @return 收到影响的行数
     */
    Integer insertData(Address address);

    Integer countByUid(Integer uid);

    List<Address> findByUid(Integer uid);

     Address findByAidAndAddress(Integer aid);

     Integer  updateNonDefule(Integer uid);

     Integer updateDefaultByAid(@Param("aid") Integer aid,
                                @Param("modifiedUser") String modifiedUser,
                                @Param("modifiedTime")Date modifiedTime);
     //删除
     Integer deleteByAid(Integer aid);
       //最后一次收货地址
       Address  findLastModified(Integer uid);

}
